﻿<UserControl x:Class="RapidDict.Modules.Translator.Views.TranslatorView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:Behaviours="clr-namespace:RapidDict.Modules.Translator.Behaviours">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="25"/>
            <RowDefinition Height="1"/>
            <RowDefinition Height="25"/>
        </Grid.RowDefinitions>
        <TextBox 
            Behaviours:SelectAllOnFocusBehaviour.SelectAllOnFocus="True"
            BorderThickness="0" 
            FontSize="12"
            ToolTip="Write here any word or any phrase to translate and press Enter" 
            Grid.Row="0" 
            Padding="2" 
            VerticalContentAlignment="Center" 
            Name="tbxWord" 
            Text="{Binding Path=Word, UpdateSourceTrigger=Explicit}" 
            KeyUp="WordKeyUp"/>
        <Label 
            BorderBrush="Black" 
            BorderThickness="1" 
            Grid.Row="1" 
            Padding="2"/>
        <TextBox 
            FontSize="12"
            BorderThickness="0" 
            IsReadOnly="True" 
            ToolTip="Here you can see the translation for your word or phrase" 
            Grid.Row="2" 
            Padding="2" 
            VerticalContentAlignment="Center" 
            Name="tbxTranslation" 
            Text="{Binding Path=Translation, Mode=OneWay}"  />
    </Grid>
</UserControl>
